home *** CD-ROM | disk | FTP | other *** search
- package
- {
- import flash.display.MovieClip;
- import flash.events.Event;
-
- public class BirdChar extends MovieClip
- {
-
-
- private var §\x01\x01\x02\t§:* = null;
-
- internal const OBTHEIGHT:* = 70;
-
- internal const ARMORDAMAGE:* = 5;
-
- private var §\x01\x01\x06\r§:* = null;
-
- private var §\x01\x01\t\x0e§:* = null;
-
- private var §\x01\x01\t\x0f§:*;
-
- internal const OBTWIDTH:* = 160;
-
- private var §\x01\x01\t\x10§:Boolean = true;
-
- private var §\x01\x01\n\x01§:Boolean;
-
- internal const OBTYPOS:* = 175;
-
- internal const HEALTHDAMAGE:* = 15;
-
- private var §\x01\x01\x07\x03§:* = 15;
-
- public function BirdChar()
- {
- §\x01\x01\x02\t§ = null;
- §\x01\x01\x06\r§ = null;
- §\x01\x01\t\x0e§ = null;
- §\x01\x01\x07\x03§ = 15;
- §\x01\x01\t\x10§ = true;
- super();
- }
-
- public function GetCharType() : String
- {
- return "bird";
- }
-
- public function Init(param1:*, param2:*, param3:*) : *
- {
- §\x01\x01\x06\r§ = param2;
- §\x01\x01\x02\t§ = param1;
- §\x01\x01\t\x0f§ = param3;
- §\x01\x01\t\x10§ = true;
- §\x01\x01\n\x01§ = true;
- §\x01\x01\t\x0e§ = param3.theKnight;
- this.width = OBTWIDTH;
- this.height = OBTHEIGHT;
- this.y = OBTYPOS;
- §\x01\x01\x02\t§.addEventListener(Event.ENTER_FRAME,§\x01\x01\x06\x0e§,false,0,true);
- }
-
- public function Reset() : *
- {
- §\x01\x01\t\x10§ = true;
- §\x01\x01\n\x01§ = true;
- SetFace("default");
- §\x01\x01\x02\t§.removeEventListener(Event.ENTER_FRAME,§\x01\x01\x06\x0e§);
- §\x01\x01\x02\t§.addEventListener(Event.ENTER_FRAME,§\x01\x01\x06\x0e§,false,0,true);
- }
-
- public function GetHealthDamage() : int
- {
- return HEALTHDAMAGE;
- }
-
- public function SetLive(param1:Boolean) : *
- {
- §\x01\x01\n\x01§ = param1;
- if(!param1)
- {
- SetFace("dead");
- }
- }
-
- public function GetLive() : Boolean
- {
- return §\x01\x01\n\x01§;
- }
-
- public function GetArmorDamage() : int
- {
- return ARMORDAMAGE;
- }
-
- public function GetCharScore() : int
- {
- return 200;
- }
-
- private function §\x01\x01\x06\x0e§(param1:Event) : *
- {
- if(§\x01\x01\n\x01§)
- {
- if(Math.abs(§\x01\x01\t\x0e§.x - this.x) <= §\x01\x01\t\x0e§.width * 4 && §\x01\x01\t\x10§)
- {
- SetFace("attack");
- §\x01\x01\t\x10§ = false;
- }
- if(this.x > -100)
- {
- this.x -= §\x01\x01\x07\x03§;
- }
- else
- {
- §\x01\x01\t\x0f§.DestroyObstacle(this);
- }
- }
- else if(this.currentLabel == "smokeend")
- {
- §\x01\x01\t\x0f§.DestroyObstacle(this);
- }
- }
-
- private function SetFace(param1:String) : *
- {
- if(param1 == "fly")
- {
- gotoAndPlay("fly");
- }
- else if(param1 == "attack")
- {
- gotoAndPlay("attack");
- }
- else if(param1 == "dead")
- {
- gotoAndPlay("dead");
- }
- else
- {
- gotoAndPlay("fly");
- }
- }
-
- public function Destroy() : *
- {
- §\x01\x01\x02\t§.removeEventListener(Event.ENTER_FRAME,§\x01\x01\x06\x0e§);
- }
- }
- }
-